//
//  PersonBtn.m
//  SoundPill
//
//  Created by 宋旭东 on 15/5/4.
//  Copyright (c) 2015年 宋旭东. All rights reserved.
//

#import "PersonBtn.h"

@implementation PersonBtn
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubviews];
    }
    return self;
}
- (void)createSubviews
{
    self.personTitle = [[UILabel alloc] initWithFrame:CGRectMake(0, self.frame.size.height*0.08, self.frame.size.width, self.frame.size.height*0.4)];
    self.personTitle.backgroundColor = [UIColor clearColor];
    _personTitle.textColor = [UIColor blackColor];
    _personTitle.font = [UIFont systemFontOfSize:14];
    _personTitle.textAlignment = NSTextAlignmentCenter;
    [self addSubview:_personTitle];
    
    self.grayline = [[UIView alloc]initWithFrame:CGRectMake(self.frame.size.width*0.4, self.frame.size.height*0.5, self.frame.size.width*0.2, 2)];
    self.grayline.backgroundColor = [UIColor grayColor];
    [self addSubview:_grayline];
    self.grayline.hidden = YES;
    
    self.content = [[UITextField alloc] initWithFrame:CGRectMake(0, self.frame.size.height*0.53, self.frame.size.width, self.frame.size.height*0.4)];
    _content.returnKeyType = UIReturnKeyDone;
    self.content.backgroundColor = [UIColor whiteColor];
    _content.textAlignment = NSTextAlignmentCenter;
    _content.textColor = [UIColor blackColor];
    _content.font = [UIFont systemFontOfSize:16];
    [self addSubview:_content];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
